﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.CodeDom.Compiler;
using System.IO;

namespace RobotBattle2.Scripting {
	public abstract class AstNode {
		public void Dump(TextWriter writer) {
			this.Dump(new IndentedTextWriter(writer));
		}
		public abstract void Dump(IndentedTextWriter writer);

		public override string ToString() {
			var sw = new StringWriter();
			Dump(sw);
			return sw.ToString();
		}
	}
}
